import request from '@/config/axios'

// 品类标签 VO
export interface CategoryTagVO {
  id: number // 编号
  tagName: string // 标签名
}

// 品类标签 API
export const CategoryTagApi = {
  // 查询品类标签分页
  getCategoryTagPage: async (params: any) => {
    return await request.get({ url: `/system/category-tag/page`, params })
  },

  // 查询品类标签详情
  getCategoryTag: async (id: number) => {
    return await request.get({ url: `/system/category-tag/get?id=` + id })
  },

  // 新增品类标签
  createCategoryTag: async (data: CategoryTagVO) => {
    return await request.post({ url: `/system/category-tag/create`, data })
  },

  // 修改品类标签
  updateCategoryTag: async (data: CategoryTagVO) => {
    return await request.put({ url: `/system/category-tag/update`, data })
  },

  // 删除品类标签
  deleteCategoryTag: async (id: number) => {
    return await request.delete({ url: `/system/category-tag/delete?id=` + id })
  },

  // 导出品类标签 Excel
  exportCategoryTag: async (params) => {
    return await request.download({ url: `/system/category-tag/export-excel`, params })
  },
}